import React from 'react'
import { Descriptions } from 'antd'
import { useStore } from '@/store'
import { formatState } from '@/utils'
const Description: React.FC = () => {
  const userInfo = useStore(state => state.userInfo)
  return (
    <Descriptions title='用户信息'>
      <Descriptions.Item label='用户ID'>{userInfo.userId}</Descriptions.Item>
      <Descriptions.Item label='邮箱'>{userInfo.userEmail}</Descriptions.Item>
      <Descriptions.Item label='状态'>{formatState(userInfo.state)}</Descriptions.Item>
      <Descriptions.Item label='手机号'>{userInfo.mobile}</Descriptions.Item>
      <Descriptions.Item label='岗位'>{userInfo.job}</Descriptions.Item>
      <Descriptions.Item label='部门'>{userInfo.deptName}</Descriptions.Item>
    </Descriptions>
  )
}

export default React.memo(Description)
